<me:UIMENU x:Class="WPFExcelReport.TSTMENU"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
             xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"   
             xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
            xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
            xmlns:me="clr-namespace:WPFExcelReport" 
            xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls" 
            x:Name="TV"
            Loaded="Window_Loaded"
         >
    <me:UIMENU.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
    </me:UIMENU.Resources>

    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="3*"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions> 
        
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
            <Grid   Visibility="{Binding IsgpArticle,Converter={StaticResource ResourceKey=bv},ElementName=TV}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Source={Localization:Translate Word=工艺开发}}" ></TextBlock>
                <WrapPanel Grid.Column="1" x:Name="gpArticle">
                </WrapPanel> 
            </Grid>
            <Grid   Visibility="{Binding IsgpSample,Converter={StaticResource ResourceKey=bv},ElementName=TV}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Source={Localization:Translate Word=S样}}" ></TextBlock>
                <WrapPanel Grid.Column="1" x:Name="gpSample">
                </WrapPanel>
            </Grid>
            <Grid Visibility="{Binding IsgpPlan,Converter={StaticResource ResourceKey=bv},ElementName=TV}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Source={Localization:Translate Word=计划}}" ></TextBlock>
                <WrapPanel Grid.Column="1" Name="gpPlan"/>
            </Grid>
            <Grid  Visibility="{Binding IsgpWarehouse,Converter={StaticResource ResourceKey=bv},ElementName=TV}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Source={Localization:Translate Word=仓库}}" ></TextBlock>
                <WrapPanel Grid.Column="1" Name="gpWarehouse"/>
            </Grid>
            <Grid  Visibility="{Binding IsgpDye,Converter={StaticResource ResourceKey=bv},ElementName=TV}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Source={Localization:Translate Word=染色}}" ></TextBlock>
                <WrapPanel Grid.Column="1" Name="gpDye"/>
            </Grid>
            <Grid  Visibility="{Binding IsgpSizing,Converter={StaticResource ResourceKey=bv},ElementName=TV}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Source={Localization:Translate Word=浆纱}}" ></TextBlock>
                <WrapPanel Grid.Column="1" Name="gpSizing"/>
            </Grid>
            <Grid  Visibility="{Binding IsgpWeaving,Converter={StaticResource ResourceKey=bv},ElementName=TV}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Source={Localization:Translate Word=织造}}" ></TextBlock>
                <WrapPanel Grid.Column="1" Name="gpWeaving"/>
            </Grid>
            <Grid  Visibility="{Binding IsgpFinish,Converter={StaticResource ResourceKey=bv},ElementName=TV}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Source={Localization:Translate Word=成品}}" ></TextBlock>
                <WrapPanel Grid.Column="1" Name="gpFinish"/>
            </Grid>
            <Grid  Visibility="{Binding IsgpFinish,Converter={StaticResource ResourceKey=bv},ElementName=TV}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Source={Localization:Translate Word=后整理}}" ></TextBlock>
                <WrapPanel Grid.Column="1" Name="gpFinishing"/>
            </Grid>
            <Grid  Visibility="{Binding IsgpProd,Converter={StaticResource ResourceKey=bv},ElementName=TV}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Source={Localization:Translate Word=单证}}" ></TextBlock>
                <WrapPanel Grid.Column="1" Name="gpProd"/>
            </Grid>
            <Grid   Visibility="{Binding IsgpSales,Converter={StaticResource ResourceKey=bv},ElementName=TV}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Source={Localization:Translate Word=销售部}}" ></TextBlock>
                <WrapPanel Grid.Column="1" Name="gpSales"/>
            </Grid>
            <Grid  Visibility="{Binding IsgpEK,Converter={StaticResource ResourceKey=bv},ElementName=TV}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Source={Localization:Translate Word=采购部}}" ></TextBlock>
                <WrapPanel Grid.Column="1" Name="gpEK"/>
            </Grid>

            <Grid  Visibility="{Binding IsgpWS03,Converter={StaticResource ResourceKey=bv},ElementName=TV}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Source={Localization:Translate Word=质检}}" ></TextBlock>
                <WrapPanel Grid.Column="1" Name="gpWS03"/>
            </Grid>
            <Grid  Visibility="{Binding IsgPONe,Converter={StaticResource ResourceKey=bv},ElementName=TV}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Source={Localization:Translate Word=综合}}" ></TextBlock>
                <WrapPanel Grid.Column="1" Name="gPONe"/>
            </Grid>
            <Grid  Visibility="{Binding IsgpINOUTINV,Converter={StaticResource ResourceKey=bv},ElementName=TV}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Source={Localization:Translate Word=财务}}" ></TextBlock>
                <WrapPanel Grid.Column="1" Name="gpINOUTINV"/>
            </Grid>
            <Grid  Visibility="{Binding IsgpSystem,Converter={StaticResource ResourceKey=bv},ElementName=TV}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="{Binding Source={Localization:Translate Word=系统设定}}" ></TextBlock>
                <WrapPanel Grid.Column="1" Name="gpSystem"/>
            </Grid>
        </StackPanel> 
    </Grid>
</me:UIMENU>
